<template>
  <div class="login">
    <el-form ref="form" :model="loginUser" label-width="55px" class="loginForm">
      <h3 class="login_title">登录</h3>
      <el-form-item label="用户名">
        <el-input v-model="loginUser.username" placeholder="请输入用户名"></el-input>
      </el-form-item>
      <el-form-item label="密码">
        <el-input v-model="loginUser.password" type="password" placeholder="请输入密码"></el-input>
      </el-form-item>
      <el-form-item style="width: 100%">
        <el-button type="primary" style="width: 100%;background: #505458;border: none">登录</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>


<script lang="ts">
import { reactive } from 'vue'

export default {
  name: 'Login',
  setup() {
    // 表单字段
    const loginUser = reactive({
      username: '',
      password: ''
    })
    return { loginUser }
  },
}
</script>

<style rel="stylesheet/scss" lang="scss">
.login {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  background-image: url("../assets/login-background.jpg");
  background-size: cover;
}

.loginForm {
  border-radius: 15px;
  background-clip: padding-box;
  margin: 90px auto;
  width: 350px;
  padding: 35px 35px 35px 35px;
  background: #fff;
  border: 1px solid #eaeaea;
  box-shadow: 0 0 25px #cac6c6;
}

.login_title {
  margin: 0 auto 40px auto;
  text-align: center;
  color: #505458;
}

</style>
